<template>
  <div class="page">
    统计
    <div id="first"></div>
  </div>
</template>

<script>
import * as echarts from 'echarts'
export default {
  data() {
    return {
      data: [],
    }
  },
  mounted() {
    var chartDom = document.getElementById(`first`)
    var myChart = echarts.init(chartDom)
    var option

    option = {
      xAxis: {
        type: `category`,
        data: [`Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`],
      },
      yAxis: {
        type: `value`,
      },
      series: [
        {
          data: [150, 230, 224, 218, 135, 147, 260],
          type: `line`,
        },
      ],
    }

    option && myChart.setOption(option)
  },
  methods: {},
}
</script>
<style lang="less" scoped>
#first {
  border: 1px solid red;
  width: 400px;
  height: 200px;
}
</style>
